﻿package  
{
	
	/**
	* ...
	* @author DefaultUser (Tools -> Custom Arguments...)
	*/
	public class Apple extends PickUp
	{
		
		public function Apple(X:Number,Y:Number,animation:AnimatedSprite) 
		{
			super(X, Y);
			var explode:Animation = new Animation(11);
			var idle:Animation = new Animation(18);
				
				
			idle.FramesPerSecond = 15;
			explode.FramesPerSecond = 20;
				
			
			this._animation = animation;
			
			
			
			

			this._animation.Animations["apple"] = idle;
			this._animation.Animations["apple_explode"] = explode;
			this._animation.CurrentAnimation = "apple";
			this.addChild(_animation);
			
			
		}
		public override function dispose():void
		{
			Main.hud.score += 100 * Main.hud.multi;
			Main.hud.multi += 1;
			this._animation.CurrentAnimation = "apple_explode";
			super.dispose();
			Main.sound.play("apple_crunch");
		}

		
	}
	
}